package setget;

public class BallTest {
	public static void main(String[] args) {
		Ball ball = new Ball();
		// 私有的属性不能直接访问
		//ball.r = 5;
		ball.setRadius(5);
		
		double r = ball.getRadius();
		System.out.println(r);
		
		// 给球设置name,并输出name
		ball.setName("科比的篮球");
		String name = ball.getName();
		System.out.println(name);
	}
}
